package com.study.mallcoupon.controller;


import com.stydy.mallcommon.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 优惠券信息 前端控制器
 * </p>
 *
 * @author admin
 * @since 2022-03-05
 */

@RestController
@RequestMapping("coupon")
public class SmsCouponController {

    @Value("${user.name}")
     private String name;

    @Value("${user.age}")
    private Integer age;
    @PostMapping("/list")
    public R test(){
        System.out.println("1");
        System.out.println(R.ok());
        return R.ok().put("1","sucess");
    }

    @GetMapping("/peizhi")
    public R test1(){
        return R.ok().put("name",name).put("age",age);
    }
}

